//深拷贝函数
function deepclone(obj){
  let newobj=Array.isArray(obj)?[]:{};
  for(let key in obj){
    if(typeof obj[key]==="object"){
      newobj[key]=deepclone(obj[key])
    }else{
      newobj[key]=obj[key]
    }
  }
  return newobj;
}